home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / extensions / spec / histogram.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  27.4 KB  |  669 lines

  1. Name
  2.  
  3.     EXT_histogram
  4.  
  5. Name Strings
  6.  
  7.     GL_EXT_histogram
  8.  
  9. Version
  10.  
  11.     $Date: 1995/09/30 02:31:10 $ $Revision: 1.1 $
  12.  
  13. Number
  14.  
  15.     11
  16.  
  17. Dependencies
  18.  
  19.     EXT_abgr affects the definition of this extension
  20.     EXT_texture is required
  21.  
  22. Overview
  23.  
  24.     This extension defines pixel operations that count occurences of
  25.     specific color component values (histogram) and that track the minimum
  26.     and maximum color component values (minmax).  An optional mode allows
  27.     pixel data to be discarded after the histogram and/or minmax operations
  28.     are completed.  Otherwise the pixel data continue on to the next
  29.     operation unaffected.
  30.  
  31. New Procedures and Functions
  32.  
  33.     void HistogramEXT(enum target,
  34.               sizei width,
  35.               enum internalformat,
  36.               boolean sink);
  37.  
  38.     void ResetHistogramEXT(enum target);
  39.  
  40.     void GetHistogramEXT(enum target,
  41.              boolean reset,
  42.              enum format,
  43.              enum type,
  44.              void* values);
  45.  
  46.     void GetHistogramParameterivEXT(enum target,
  47.                     enum pname,
  48.                     int* params);
  49.  
  50.     void GetHistogramParameterfvEXT(enum target,
  51.                     enum pname,
  52.                     float* params);
  53.  
  54.     void MinmaxEXT(enum target,
  55.            enum internalformat,
  56.            boolean sink);
  57.  
  58.     void ResetMinmaxEXT(enum target);
  59.  
  60.     void GetMinmaxEXT(enum target,
  61.               boolean reset,
  62.               enum format,
  63.               enum type,
  64.               void* values);
  65.  
  66.     void GetMinmaxParameterivEXT(enum target,
  67.                  enum pname,
  68.                  int* params);
  69.  
  70.     void GetMinmaxParameterfvEXT(enum target,
  71.                  enum pname,
  72.                  float* params);
  73.  
  74. New Tokens
  75.  
  76.     Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
  77.     the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
  78.     GetDoublev, and by the <target> parameter of HistogramEXT,
  79.     ResetHistogramEXT, GetHistogramEXT, GetHistogramParameterivEXT, and
  80.     GetHistogramParameterfvEXT:
  81.  
  82.     HISTOGRAM_EXT                0x8024
  83.  
  84.     Accepted by the <target> parameter of HistogramEXT,
  85.     GetHistogramParameterivEXT, and GetHistogramParameterfvEXT:
  86.  
  87.     PROXY_HISTOGRAM_EXT            0x8025
  88.  
  89.     Accepted by the <pname> parameter of GetHistogramParameterivEXT and
  90.     GetHistogramParameterfvEXT:
  91.  
  92.     HISTOGRAM_WIDTH_EXT                 0x8026
  93.     HISTOGRAM_FORMAT_EXT                0x8027
  94.     HISTOGRAM_RED_SIZE_EXT              0x8028
  95.     HISTOGRAM_GREEN_SIZE_EXT            0x8029
  96.     HISTOGRAM_BLUE_SIZE_EXT             0x802A
  97.     HISTOGRAM_ALPHA_SIZE_EXT            0x802B
  98.     HISTOGRAM_LUMINANCE_SIZE_EXT        0x802C
  99.     HISTOGRAM_SINK_EXT                  0x802D
  100.  
  101.     Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
  102.     the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
  103.     GetDoublev, and by the <target> parameter of MinmaxEXT, ResetMinmaxEXT,
  104.     and GetMinmaxEXT:
  105.  
  106.     MINMAX_EXT                0x802E
  107.  
  108.     Accepted by the <pname> parameter of GetMinmaxParameterivEXT and
  109.     GetMinmaxParameterfvEXT:
  110.  
  111.     MINMAX_FORMAT_EXT            0x802F
  112.     MINMAX_SINK_EXT                0x8030
  113.  
  114. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  115.  
  116.     A new error token value, TABLE_TOO_LARGE_EXT, is defined and added to
  117.     table 2.3:
  118.                                        Offending
  119.                                        command
  120.     Error            Description                   ignored?
  121.     -----            -----------                   ---------
  122.     INVALID_ENUM        enum argument out of range           Yes
  123.     INVALID_VALUE        Numeric argument out of range           Yes
  124.     INVALID_OPERATION    Operation illegal in current state       Yes
  125.     STACK_OVERFLOW        Command would cause a stack overflow       Yes
  126.     STACK_UNDERFLOW        Command would cause a stack underflow       Yes
  127.     OUT_OF_MEMORY        Not enough memory left to execute command  Unknown
  128.     TEXTURE_TOO_LARGE_SGI    The specified texture is too large       Yes
  129.     TABLE_TOO_LARGE_EXT    The specified table is too large       Yes
  130.  
  131.     Table 2.3: Summary of GL errors
  132.  
  133.     and defined as follows:
  134.  
  135.     GL_TABLE_TOO_LARGE_EXT              0x8031
  136.  
  137.  
  138. Additions to Chapter 3 of the 1.0 specification (Rasterization)
  139.  
  140.     The specification of histogram and minmax operators is added to the GL
  141.     Specification in section 3.6.2, "Pixel Transfer Modes."  A histogram
  142.     table is specified using the HistogramEXT command.  Its <target>
  143.     parameter must be HISTOGRAM_EXT if a histogram table is to be specified.
  144.     (Optional target value PROXY_HISTOGRAM_EXT is described below.)
  145.     Its <width> parameter, which must be a power of 2, specifies the number
  146.     of entries in the histogram
  147.     table, and its <internalformat> parameter specifies the format of each
  148.     table entry.  <sink> specifies whether pixel groups will be consumed by
  149.     the histogram operation (TRUE) or passed on to the minmax operation
  150.     (FALSE).  The error INVALID_VALUE results if <width> is specified less
  151.     than zero or is not a power of 2.  The error TABLE_TOO_LARGE_EXT
  152.     results if the specified
  153.     histogram table is too large for the implementation.  (See the PROXY
  154.     discussion below.)  The error INVALID_ENUM results if <internalformat>
  155.     is not one of the values accepted by the <components> parameter of
  156.     TexImage2D (as defined by EXT_texture), except that values 1, 2, 3, 4,
  157.     INTENSITY_EXT, INTENSITY4_EXT, INTENSITY8_EXT, INTENSITY12_EXT, and
  158.     INTENSITY16_EXT are not accepted.
  159.  
  160.     If no error results from the execution of HistogramEXT, the specified
  161.     histogram table is redefined to have <width> entries, each with the
  162.     specified internal format.  The entries are indexed zero through N-1,
  163.     where N is the <width> of the table.  Each value in each entry is set
  164.     to zero.  The values in the previous histogram table, if any, are lost.
  165.     
  166.     It is acceptable for an implementation to vary its allocation of
  167.     internal component resolution based any HistogramEXT parameter, but the
  168.     allocation must not be a function of any other factor, and cannot be
  169.     changed once it is established.  In particular, allocations must be
  170.     invariant -- the same allocation must be made each time a histogram is
  171.     specified with the same parameter values.  Provision is made for an
  172.     application to determine what component resolutions are available
  173.     without having to fully specify the histogram (see below).
  174.  
  175.     A minmax table is specified using the MinmaxEXT command.  Its <target>
  176.     parameter must be MINMAX_EXT.  <internalformat> may be any of the token
  177.     values accepted by the <components> parameter of TexImage2D, except that
  178.     1, 2, 3, 4, INTENSITY_EXT, INTENSITY4_EXT, INTENSITY8_EXT,
  179.     INTENSITY12_EXT, and INTENSITY16_EXT are not accepted.  <sink> is set
  180.     to TRUE or FALSE.  The resulting minmax table always has 2 entries,
  181.     each with values corresponding only to the components of the internal
  182.     format.
  183.  
  184.     The operations of the histogram and minmax are added to the GL
  185.     Specification in section 3.6.3, "Rasterization of Pixel Rectangles,
  186.     immediately following the subsection "Index Lookup", and immediately
  187.     prior to the subsection "Final Conversion".  Histogram and minmax
  188.     operations are performed only for RGBA pixel groups, though these
  189.     groups may have been specified as color indices and converted to RGBA
  190.     by index table lookup.  Histogram and minmax are enabled and disabled
  191.     by calling Enable or Disable with HISTOGRAM_EXT or MINMAX_EXT passed as
  192.     the <cap> parameter.  If HISTOGRAM_EXT is enabled, and the pixel groups
  193.     contain RGBA values, then indices Ri, Gi, Bi, and Ai are derived from
  194.     the red, green, blue, and alpha components of each pixel group (without
  195.     modifying these components) by clamping the components to [0,1],
  196.     multiplying each by one less than the width of the histogram table, and
  197.     rounding each to the nearest integer.  If the format of the
  198.     HISTOGRAM_EXT table includes red or luminance, the red or luminance
  199.     component of histogram entry Ri is incremented by one.  If the format
  200.     of the HISTOGRAM_EXT table includes green, the green component of
  201.     histogram entry Gi is incremented by one.  The blue and alpha
  202.     components of histogram entries Bi and Ai are incremented in the same
  203.     way.  If a histogram entry component is incremented beyond its maximum
  204.     value, its value becomes undefined.  (This is not an error.)
  205.  
  206.     If MINMAX_EXT is enabled, and the pixel groups contain RGBA values, then
  207.     the red, green, blue, and alpha components of each group are compared
  208.     to the minimum and maximum values for each, which are stored in the
  209.     2-element minmax table.  (The first element stores the minimum values,
  210.     the second stores the maximum values.)  If the format of this table
  211.     includes red or luminance, the red component value replaces the red or
  212.     luminance value in the minimum table element if and only if it is less
  213.     than that component.  Likewise, if the format includes red or luminance
  214.     and the red component of the group is greater than the red or luminance
  215.     value in the maximum element, the red group component replaces the red
  216.     or luminance maximum component.  If the format of the table includes
  217.     green, the green group component conditionally replaces the green
  218.     minimum and/or maximum if it is smaller or larger, respectively.  The
  219.     blue and alpha group components are similarly tested and replaced, if
  220.     the table format includes blue and/or alpha.  The internal type of the
  221.     minimum and maximum component values is floating point -- there are no
  222.     semantics defined for the treatment of group component values that are
  223.     outside the representable range of the minimum and maximum values.
  224.  
  225.     By default histogram and minmax operations have no effect on the stream
  226.     of pixel groups being processed.  If HISTOGRAM_EXT is enabled and the
  227.     histogram <sink> parameter was specified as TRUE, however, all RGBA
  228.     pixel groups are discarded immediately after the histogram operation
  229.     is completed.  Because histogram precedes minmax, no minmax operation
  230.     is performed.  No pixel fragments are generated, no change is made to
  231.     texture memory contents, and no pixel values are returned.  If
  232.     MINMAX_EXT is enabled and the minmax <sink> parameter was specified
  233.     as TRUE, all RGBA pixel groups are discarded immediately after the
  234.     minmax operation is completed.  Because minmax follows histogram, a
  235.     histogram operation with <sink> set to FALSE may precede such a minmax
  236.     operation.  Again no pixel fragments are generated, no change is made
  237.     to texture memory contents, and no pixel values are returned.
  238.  
  239.     The current contents of the histogram tables are queried using
  240.     GetHistogramEXT.  <target> must be HISTOGRAM_EXT.  <format> must be one
  241.     of RED, GREEN, BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or
  242.     LUMINANCE_ALPHA.  <type> must be UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT,
  243.     SHORT, UNSIGNED_INT, INT, or FLOAT.  A 1-dimensional image with the
  244.     same width as the histogram is returned to <values>.  No pixel
  245.     transfer operations are performed on this image, but pixel storage
  246.     modes that are applicable to 1-dimensional images are performed.  Color
  247.     components that are requested in the specified <format>, but which are
  248.     not included in the internal format of the histogram, are returned as
  249.     zero.  The assignments of internal color components to the components
  250.     requested by <format> are
  251.  
  252.         internal component    resulting component
  253.         ------------------    -------------------
  254.         red            red
  255.         green            green
  256.         blue            blue
  257.         alpha            alpha
  258.         luminance        red
  259.     
  260.     <reset> is either TRUE or FALSE.  If TRUE, each component counter that
  261.     is actually returned is reset to zero.  Counters that are not returned
  262.     are not modified.  All counters of all elements of histogram <target>
  263.     are reset to zero when ResetHistogramEXT is called.  <target> must be
  264.     either HISTOGRAM_EXT.  It is not an error to reset or query the contents
  265.     of a histogram table with zero entries.
  266.  
  267.     The current contents of the minmax tables are queried using GetMinmaxEXT.
  268.     <target> must be MINMAX_EXT.  <format> must be one of RED, GREEN, BLUE,
  269.     ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA.  <type> must
  270.     be UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or
  271.     FLOAT.  A 1-dimensional image with width of 2 is returned to values.
  272.     No pixel transfer operations are performed on this image, but pixel
  273.     storage modes that are applicable to 1-dimensional images are performed.
  274.     Color components that are requested in the specified <format>, but which
  275.     are not included in the internal format of the minmax table, are
  276.     returned as zero.  The assignment of internal color components to the
  277.     components requested by <format> are the same as for histogram return.
  278.  
  279.     <reset> is either TRUE or FALSE.  If TRUE, each minimum value that is
  280.     actually returned is reset to the maximum representable value, and each
  281.     maximum value that is returned is reset to the minimum representable
  282.     value.  Minimum and maximum values that are not returned are not
  283.     modified.  All minimum and maximum values of minmax table <target> are
  284.     reset to their maximum and minimum representable values, respectively,
  285.     when ResetMinmaxEXT is called.  <target> must be MINMAX_EXT.
  286.  
  287.     Query support
  288.     -------------
  289.  
  290.     Alternate sets of histogram state are defined for the proxy histogram
  291.     PROXY_HISTOGRAM_EXT.  When HistogramEXT is called with <target> set to
  292.     PROXY_HISTOGRAM_EXT, proxy state values HISTOGRAM_WIDTH_EXT,
  293.     HISTOGRAM_FORMAT, HISTOGRAM_RED_SIZE_EXT, HISTOGRAM_GREEN_SIZE_EXT,
  294.     HISTOGRAM_BLUE_SIZE_EXT, HISTOGRAM_ALPHA_SIZE_EXT, and
  295.     HISTOGRAM_LUMINANCE_SIZE_EXT are always recomputed and updated, even
  296.     if the histogram is too large to actually be used.  If the histogram
  297.     is too large, all of these state variables are set to zero.  If the
  298.     histogram could be accommodated by Histogram called with <target>
  299.     HISTOGRAM_EXT, these values are set as though HISTOGRAM_EXT were being
  300.     defined.  All of these state values can be queried with
  301.     GetHistogramParameterivEXT or GetHistogramParameterfvEXT with <target>
  302.     set to PROXY_HISTOGRAM_EXT.  Calling HistogramEXT with <target>
  303.     PROXY_HISTOGRAM_EXT has no effect on the actual histogram.
  304.  
  305.     There is no image associated with PROXY_HISTOGRAM_EXT.  Therefore
  306.     PROXY_HISTOGRAM_EXT cannot be used as a histogram, and its image must
  307.     never be queried using GetHistogramEXT.  (The error INVALID_ENUM
  308.     results if this is attempted.)
  309.  
  310. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  311. and the Framebuffer)
  312.  
  313.     The operation of histogram and minmax during pixel copy and query
  314.     operations is identical to the operation during pixel drawing and
  315.     texture image definition.
  316.  
  317. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  318.  
  319.     GetHistogramEXT, GetHistogramParameterivEXT, GetHistogramParameterfvEXT,
  320.     GetMinmaxEXT, GetMinmaxParameterivEXT, and GetMinmaxParameterfvEXT are
  321.     not included in display lists -- they are executed immediately when
  322.     called.
  323.  
  324. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  325.  
  326.     Integer and floating point query functions GetHistogramParameterivEXT
  327.     and GetHistogramParameterfvEXT are provided.  <target> must be
  328.     HISTOGRAM_EXT or PROXY_HISTOGRAM_EXT.  <pname> is one of
  329.     HISTOGRAM_FORMAT_EXT, HISTOGRAM_WIDTH_EXT, HISTOGRAM_RED_SIZE_EXT,
  330.     HISTOGRAM_GREEN_SIZE_EXT, HISTOGRAM_BLUE_SIZE_EXT,
  331.     HISTOGRAM_ALPHA_SIZE_EXT, HISTOGRAM_LUMINANCE_SIZE_EXT,
  332.     or HISTOGRAM_SINK_EXT.  The value of the specified parameter is
  333.     returned in <params>.
  334.  
  335.     Integer and floating point query functions GetMinmaxParameterivEXT and
  336.     GetMinmaxParameterfvEXT are provided.  <target> must be MINMAX_EXT.
  337.     <pname> is MINMAX_FORMAT_EXT or MINMAX_SINK_EXT.  The value of the
  338.     specified parameter is returned in <params>.
  339.  
  340. Additions to the GLX Specification
  341.  
  342.     None
  343.  
  344. GLX Protocol
  345.  
  346.     Ten new GL commands are added.
  347.  
  348.     The following four rendering commands are sent to the server as part of a glXRender 
  349.     request:
  350.  
  351.         HistogramEXT
  352.             2           20              rendering command length
  353.             2           4110            rendering command opcode
  354.         4        ENUM        target
  355.         4         INT32        width
  356.         4        ENUM        internalformat
  357.         1        BOOL        sink
  358.         3                unused
  359.  
  360.         ResetHistogramEXT
  361.             2           8               rendering command length
  362.             2           4112            rendering command opcode
  363.         4        ENUM        target
  364.  
  365.         MinmaxEXT
  366.             2           16              rendering command length
  367.             2           4111            rendering command opcode
  368.         4        ENUM        target
  369.         4        ENUM        internalformat
  370.         1        BOOL        sink
  371.         3                unused
  372.  
  373.         ResetMinmaxEXT
  374.             2           8               rendering command length
  375.             2           4113            rendering command opcode
  376.         4        ENUM        target
  377.  
  378.  
  379.     The remaining commands are non-rendering commands. These commands are sent
  380.     separately (i.e., not as part of a glXRender or glXRenderLarge request), using
  381.     the glXVendorPrivateWithReply request:
  382.  
  383.         GetHistogramEXT
  384.             1           CARD8           opcode (X assigned)
  385.             1           17              GLX opcode (glXVendorPrivateWithReply)
  386.             2           7            request length
  387.             4           5               vendor specific opcode
  388.         4        GLX_CONTEXT_TAG context tag
  389.         4        ENUM        target
  390.         4        ENUM        format
  391.         4        ENUM        type
  392.         1        BOOL        swap_bytes
  393.         1        BOOL        reset
  394.         2                unused
  395.       =>
  396.             1           1               reply
  397.             1                           unused
  398.             2           CARD16          sequence number
  399.             4           n               reply length
  400.             24                          unused
  401.             4*n         LISTofBYTE      pixels
  402.  
  403.         If <format> or <type> is not valid then the command is erroneous and n=0. The structure
  404.         of <pixels> is described in Appendix A of the GLX Protocol Specification, "Pixel Data", 
  405.         using the parameters <swap_bytes>, <format>, and <type>. No extra padding is needed after 
  406.         <pixels> because the image format already pads to 32 bits.
  407.  
  408.  
  409.         GetHistogramParameterfvEXT
  410.             1           CARD8           opcode (X assigned)
  411.             1           17              GLX opcode (glXVendorPrivateWithReply)
  412.             2           5            request length
  413.             4           6               vendor specific opcode
  414.         4        GLX_CONTEXT_TAG context tag
  415.         4        ENUM        target
  416.         4        ENUM        pname
  417.       =>
  418.             1           1               reply
  419.             1                           unused
  420.             2           CARD16          sequence number
  421.             4           m               reply length, m = (n==1 ? 0 : n)
  422.             4                           unused
  423.             4           CARD32        n
  424.  
  425.         if (n=1) this follows:
  426.  
  427.             4           INT32        params
  428.             12                          unused
  429.  
  430.         otherwise this follows:
  431.  
  432.             16                          unused
  433.         n*4        LISTofINT32     params
  434.  
  435.         Note that n may be zero, indicating that a GL error occurred. Also, n>1,
  436.         is for future extensibility.
  437.  
  438.  
  439.         GetHistogramParameterivEXT
  440.             1           CARD8           opcode (X assigned)
  441.             1           17              GLX opcode (glXVendorPrivateWithReply)
  442.             2           5            request length
  443.             4           7               vendor specific opcode
  444.         4        GLX_CONTEXT_TAG context tag
  445.         4        ENUM        target
  446.         4        ENUM        pname
  447.       =>
  448.             1           1               reply
  449.             1                           unused
  450.             2           CARD16          sequence number
  451.             4           m               reply length, m = (n==1 ? 0 : n)
  452.             4                           unused
  453.             4           CARD32        n
  454.  
  455.         if (n=1) this follows:
  456.  
  457.             4           INT32        params
  458.             12                          unused
  459.  
  460.         otherwise this follows:
  461.  
  462.             16                          unused
  463.         n*4        LISTofINT32     params
  464.  
  465.         Note that n may be zero, indicating that a GL error occurred. Also, n>1,
  466.         is for future extensibility.
  467.  
  468.  
  469.         GetMinmaxEXT
  470.             1           CARD8           opcode (X assigned)
  471.             1           17              GLX opcode (glXVendorPrivateWithReply)
  472.             2           7             request length
  473.             4           8               vendor specific opcode
  474.         4        GLX_CONTEXT_TAG context tag
  475.         4        ENUM        target
  476.         4        ENUM        format
  477.         4        ENUM        type
  478.         1        BOOL        swap_bytes
  479.         1        BOOL        reset
  480.         2                unused
  481.       =>
  482.             1           1               reply
  483.             1                           unused
  484.             2           CARD16          sequence number
  485.             4           n               reply length
  486.             24                          unused
  487.             4*n         LISTofBYTE      pixels
  488.  
  489.         If <format> or <type> is not valid then the command is erroneous and n=0. The structure
  490.         of <pixels> is described in Appendix A of the GLX Protocol Specification, "Pixel Data", 
  491.         using the parameters <swap_bytes>, <format>, and <type>. No extra padding is needed after 
  492.         <pixels> because the image format already pads to 32 bits.
  493.  
  494.  
  495.         GetMinmaxParameterfvEXT
  496.             1           CARD8           opcode (X assigned)
  497.             1           17              GLX opcode (glXVendorPrivateWithReply)
  498.             2           5            request length
  499.             4           9               vendor specific opcode
  500.         4        GLX_CONTEXT_TAG context tag
  501.         4        ENUM        target
  502.         4        ENUM        pname
  503.       =>
  504.             1           1               reply
  505.             1                           unused
  506.             2           CARD16          sequence number
  507.             4           m               reply length, m = (n==1 ? 0 : n)
  508.             4                           unused
  509.             4           CARD32        n
  510.  
  511.         if (n=1) this follows:
  512.  
  513.             4           INT32        params
  514.             12                          unused
  515.  
  516.         otherwise this follows:
  517.  
  518.             16                          unused
  519.         n*4        LISTofINT32     params
  520.  
  521.         Note that n may be zero, indicating that a GL error occurred. Also, n>1,
  522.         is for future extensibility.
  523.  
  524.  
  525.         GetMinmaxParameterivEXT
  526.             1           CARD8           opcode (X assigned)
  527.             1           17              GLX opcode (glXVendorPrivateWithReply)
  528.             2           5            request length
  529.             4           10              vendor specific opcode
  530.         4        GLX_CONTEXT_TAG context tag
  531.         4        ENUM        target
  532.         4        ENUM        pname
  533.       =>
  534.             1           1               reply
  535.             1                           unused
  536.             2           CARD16          sequence number
  537.             4           m               reply length, m = (n==1 ? 0 : n)
  538.             4                           unused
  539.             4           CARD32        n
  540.  
  541.         if (n=1) this follows:
  542.  
  543.             4           INT32        params
  544.             12                          unused
  545.  
  546.         otherwise this follows:
  547.  
  548.             16                          unused
  549.         n*4        LISTofINT32     params
  550.  
  551.  
  552.         Note that n may be zero, indicating that a GL error occurred. Also, n>1,
  553.         is for future extensibility.
  554.  
  555. Dependencies on EXT_abgr
  556.  
  557.     If EXT_abgr is supported, the <format> parameters of GetHistogramEXT
  558.     and GetMinmaxEXT accept ABGR_EXT.  Otherwise they do not.
  559.  
  560. Dependencies on EXT_texture
  561.  
  562.     EXT_texture is required.  This extension builds on the notion of
  563.     internal image format, which is defined by EXT_texture.
  564.  
  565. Errors
  566.  
  567.     INVALID_ENUM is generated if HistogramEXT parameter <target> is not
  568.     HISTOGRAM_EXT or PROXY_HISTOGRAM_EXT.
  569.  
  570.     INVALID_VALUE is generated if HistogramEXT parameter <width> is less
  571.     than zero or is not a power of 2.
  572.  
  573.     INVALID_ENUM is generated if HistogramEXT parameter <internalformat> is
  574.     not ALPHA, RGB, RGBA, LUMINANCE, LUMINANCE_ALPHA, or one of the tokens
  575.     defined by the EXT_texture extension.  (Values 1, 2, 3, and 4 are not
  576.     accepted as internal formats by HistogramEXT).
  577.  
  578.     TABLE_TOO_LARGE_EXT is generated if HistogramEXT is called with
  579.     parameter <target> of HISTOGRAM_EXT and the histogram as specified is
  580.     too large for the implementation.
  581.  
  582.     INVALID_ENUM is generated if ResetHistogramEXT parameter <target> is
  583.     not HISTOGRAM_EXT.
  584.  
  585.     INVALID_ENUM is generated if GetHistogramEXT parameter <target> is not
  586.     HISTOGRAM_EXT.
  587.  
  588.     INVALID_ENUM is generated if GetHistogramEXT parameter <format> is not
  589.     RED, GREEN, BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or
  590.     LUMINANCE_ALPHA.
  591.  
  592.     INVALID_ENUM is generated if GetHistogramEXT parameter <type> is not
  593.     UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT.
  594.  
  595.     INVALID_ENUM is generated if GetHistogramParameterivEXT or
  596.     GetHistogramParameterfvEXT parameter <target> is not HISTOGRAM_EXT or
  597.     PROXY_HISTOGRAM_EXT.
  598.  
  599.     INVALID_ENUM is generated if GetHistogramParameterivEXT or
  600.     GetHistogramParameterfvEXT parameter <pname> is not
  601.     HISTOGRAM_FORMAT_EXT, HISTOGRAM_WIDTH_EXT, HISTOGRAM_RED_SIZE_EXT,
  602.     HISTOGRAM_GREEN_SIZE_EXT, HISTOGRAM_BLUE_SIZE_EXT,
  603.     HISTOGRAM_ALPHA_SIZE_EXT, HISTOGRAM_LUMINANCE_SIZE_EXT, or
  604.     HISTOGRAM_SINK_EXT. 
  605.  
  606.     INVALID_OPERATION is generated if HistogramEXT, ResetHistogramEXT,
  607.     GetHistogramEXT, GetHistogramParameterivEXT, or
  608.     GetHistogramParameterfvEXT is called between execution of Begin and the
  609.     corresponding execution of End.
  610.  
  611.     INVALID_ENUM is generated if MinmaxEXT parameter <target> is not
  612.     MINMAX_EXT.
  613.  
  614.     INVALID_ENUM is generated if MinmaxEXT parameter <internalformat> is
  615.     not ALPHA, RGB, RGBA, LUMINANCE, LUMINANCE_ALPHA, or one of the tokens
  616.     defined by the EXT_texture extension.  (Values 1, 2, 3, and 4 are not
  617.     accepted as internal formats by MinmaxEXT).
  618.  
  619.     INVALID_ENUM is generated if ResetMinmaxEXT parameter <target> is not
  620.     MINMAX_EXT.
  621.  
  622.     INVALID_ENUM is generated if GetMinmaxEXT parameter <target> is not
  623.     MINMAX_EXT.
  624.  
  625.     INVALID_ENUM is generated if GetMinmaxEXT parameter <format> is not
  626.     RED, GREEN, BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or
  627.     LUMINANCE_ALPHA.
  628.  
  629.     INVALID_ENUM is generated if GetMinmaxEXT parameter <type> is not
  630.     UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT.
  631.  
  632.     INVALID_ENUM is generated if GetMinmaxParameterivEXT or
  633.     GetMinmaxParameterfvEXT parameter <target> is not MINMAX_EXT.
  634.  
  635.     INVALID_ENUM is generated if GetMinmaxParameterivEXT or
  636.     GetMinmaxParameterfvEXT parameter <pname> is not MINMAX_FORMAT_EXT or
  637.     MINMAX_SINK_EXT.
  638.  
  639.     INVALID_OPERATION is generated if MinmaxEXT, ResetMinmaxEXT,
  640.     GetMinmaxEXT, GetMinmaxParameterivEXT, or GetMinmaxParameterfvEXT is
  641.     called between execution of Begin and the corresponding execution of End.
  642.  
  643. New State
  644.  
  645.     Get Value                Get Command            Type    Initial Value        Attribute
  646.     ---------                -----------            ----    -------------        ---------
  647.     HISTOGRAM_EXT            IsEnabled            B    False            pixel/enable
  648.     HISTOGRAM                GetHistogramEXT        I    empty                -
  649.     HISTOGRAM_WIDTH_EXT            GetHistogramParameterivEXT    Z+    0                -
  650.     HISTOGRAM_FORMAT_EXT        GetHistogramParameterivEXT    Z33    RGBA                -
  651.     HISTOGRAM_RED_SIZE_EXT        GetHistogramParameterivEXT    Z+    0                -
  652.     HISTOGRAM_GREEN_SIZE_EXT        GetHistogramParameterivEXT    Z+    0                -
  653.     HISTOGRAM_BLUE_SIZE_EXT        GetHistogramParameterivEXT    Z+    0                -
  654.     HISTOGRAM_ALPHA_SIZE_EXT        GetHistogramParameterivEXT    Z+    0                -
  655.     HISTOGRAM_LUMINANCE_SIZE_EXT    GetHistogramParameterivEXT    Z+    0                -
  656.     HISTOGRAM_SINK_EXT            GetHistogramParameterivEXT    B    False                -
  657.  
  658.     MINMAX_EXT                IsEnabled            B    False            pixel/enable
  659.     MINMAX                GetMinmaxEXT        Rn    (M,M,M,M),(m,m,m,m)        -
  660.     MINMAX_FORMAT_EXT            GetMinmaxParameterivEXT    Z33    RGBA                -
  661.     MINMAX_SINK_EXT            GetMinmaxParameterivEXT    B    False                -
  662.  
  663.     Note, M and m are the maximum and minimum representable values of the
  664.     minmax components.
  665.  
  666. New Implementation Dependent State
  667.  
  668.     None
  669.